<?php
class CartaPagoCuota extends AppModel {
	var $name = 'CartaPagoCuota';
	var $useTable = 'cartas_pagos_cuotas';
	var $validate = array(
		'id' => array(
			'blank' => array(
				'rule' => array('blank'),
				'on' => 'create' 
			)
		),
		'carta_pago_id' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
			'numeric' => array(
				'rule' => array('numeric')
			)
		),
		'fecha_pago' => array(
			'notEmpty' => array(
				'rule' => array('notEmpty')
			),
		),
		'pagado' => array(
			'boolean' => array(
				'rule' => array('boolean')
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'monto' => array(
			'decimal' => array(
				'rule' => array('decimal',2)
			),
			'notEmpty' => array(
				'rule' => array('notEmpty')
			)
		),
		'comentario' => array(
			'maxlength' => array(
				'rule' => array('maxLength', '255')
			)
		)
	);

	var $belongsTo = array(
		'CartaPago' => array(
			'className' => 'CartaPago',
			'foreignKey' => 'carta_pago_id'
		)
	);
}
?>